package org.dark.examples.pipeline.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import protocol.command.response.MessageResponsePacket;

import java.util.Date;

/**
 * @author xiaozefeng
 * @date 2018/12/4 3:31 PM
 */
public class MessageResponseHandler extends SimpleChannelInboundHandler<MessageResponsePacket> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MessageResponsePacket messageResponsePacket) throws Exception {
        System.out.println(new Date() + "收到服务端的消息:" + messageResponsePacket.getMessage());
    }
}
